package com.mls.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mls.education.mapper.EduCourseLessonMapper;
import com.mls.education.domain.EduCourseLesson;
import com.mls.education.service.IEduCourseLessonService;
import com.mls.common.core.text.Convert;

/**
 * 课程课时信息Service业务层处理
 * 
 * @author admin
 * @date 2022-03-08
 */
@Service
public class EduCourseLessonServiceImpl implements IEduCourseLessonService 
{
    @Autowired
    private EduCourseLessonMapper eduCourseLessonMapper;

    /**
     * 查询课程课时信息
     * 
     * @param id 课程课时信息主键
     * @return 课程课时信息
     */
    @Override
    public EduCourseLesson selectEduCourseLessonById(Integer id)
    {
        return eduCourseLessonMapper.selectEduCourseLessonById(id);
    }

    /**
     * 查询课程课时信息列表
     * 
     * @param eduCourseLesson 课程课时信息
     * @return 课程课时信息
     */
    @Override
    public List<EduCourseLesson> selectEduCourseLessonList(EduCourseLesson eduCourseLesson)
    {
        return eduCourseLessonMapper.selectEduCourseLessonList(eduCourseLesson);
    }

    /**
     * 新增课程课时信息
     * 
     * @param eduCourseLesson 课程课时信息
     * @return 结果
     */
    @Override
    public int insertEduCourseLesson(EduCourseLesson eduCourseLesson)
    {
        return eduCourseLessonMapper.insertEduCourseLesson(eduCourseLesson);
    }

    /**
     * 修改课程课时信息
     * 
     * @param eduCourseLesson 课程课时信息
     * @return 结果
     */
    @Override
    public int updateEduCourseLesson(EduCourseLesson eduCourseLesson)
    {
        return eduCourseLessonMapper.updateEduCourseLesson(eduCourseLesson);
    }

    /**
     * 批量删除课程课时信息
     * 
     * @param ids 需要删除的课程课时信息主键
     * @return 结果
     */
    @Override
    public int deleteEduCourseLessonByIds(String ids)
    {
        return eduCourseLessonMapper.deleteEduCourseLessonByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除课程课时信息信息
     * 
     * @param id 课程课时信息主键
     * @return 结果
     */
    @Override
    public int deleteEduCourseLessonById(Integer id)
    {
        return eduCourseLessonMapper.deleteEduCourseLessonById(id);
    }
}
